package com.rn.ddd.domain.order.entity;

import com.rn.ddd.infrastructure.engine.Order;
import com.rn.ddd.infrastructure.engine.constant.OrderBizTypeEnum;
import com.rn.ddd.infrastructure.engine.constant.OrderStateEnum;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

/**
 * 订单领域模型
 *
 * @author 然诺
 * @date 2022/3/26
 */
@Getter
@Setter
@ToString
@Accessors(chain = true)
public class OrderDO implements Order {

    /**
     * 订单 ID
     */
    private Long orderId;

    /**
     * 订单编号
     */
    private String orderNo;

    /**
     * 订单名称
     */
    private String orderName;

    /**
     * 订单状态
     */
    private OrderStateEnum orderState;

    /**
     * 下单时间（时间错）
     */
    private Long placeTime;

    @Override
    public String getBizType() {
        return OrderBizTypeEnum.SHOP.name();
    }

    @Override
    public String getSceneId() {
        return "MOBILE";
    }
}
